//
//  StringWithWidth.m
//  Qyer
//
//  Created by 赵宇 on 15/9/14.
//  Copyright (c) 2015年 赵宇. All rights reserved.
//

#import "StringWithWidth.h"

@implementation StringWithWidth
+(CGFloat)WidthWithText:(NSString *)text height:(CGFloat)height font:(UIFont *)font
{
    CGSize size = CGSizeMake(3000, height);
    CGRect rect = [text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil];
    return  rect.size.width;
    
    
}
@end
